home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / comm / 110a115a.zip / SCRIPTS.ZIP / SCRNWIP.SLT < prev    next >
Text File  |  1995-12-21  |  1KB  |  44 lines

  1. /****************************************************************/
  2. /*                                                              */
  3. /*  Demo of how to clear the screen in a novel way.             */
  4. /*                                                              */
  5. /*                   Copyright 1995 deltaComm Development, Inc. */
  6. /*                                                              */
  7. /****************************************************************/
  8.  
  9. main()
  10. {
  11. int width, height;
  12. int i;
  13.  
  14. if (argcount<=0)                   // if the script wasn't told the screen dim.
  15.  {
  16.   width=gettermwidth();
  17.   height=gettermheight();
  18.  }
  19. else
  20.  {
  21.   // get width & height from parameters -- not currently supported in SALT.
  22.  }
  23.  
  24. flushbuf();                        // remove extraneous chars from comm buffers
  25. cursor_onoff(0);                   // turn the cursor off
  26.  
  27. for (i=0; i < (height/2); i=i+1)
  28.   {                                // Draw boxes to fill the screen w/ blanks
  29.    box(i, i, width-i, height-i, 2, 1, random(7));
  30.    delay_scr(1);                   // A short delay to help the effect
  31.   }
  32.  
  33. for (i=(height / 2)-1; i>0; i=i-1)
  34.   {                                // scroll the boxes off the screen
  35.    scroll(0, 0, width, i+1, 1, 0);
  36.    scroll(0, height-i, width, height, -1, 0);
  37.    delay(1);
  38.   }
  39.  
  40. clear_scr();                       // Clear screen completely
  41. cursor_onoff(1);                   // Show cursor
  42.  
  43. }
  44.